//package com.xiyang.operater.config;
//
//import org.springframework.cloud.netflix.eureka.EurekaInstanceConfigBean;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
///**
// * @author xiyang.ycj
// * @since Jun 22, 2019 01:53:11 AM
// */
//
////@Configuration
//public class EurekaConfig {
//
//    private final EurekaInstanceConfigBean eurekaInstanceConfigBean;
//
//    public EurekaConfig(EurekaInstanceConfigBean eurekaInstanceConfigBean) {
//        this.eurekaInstanceConfigBean = eurekaInstanceConfigBean;
//    }
//
//    /**
//     * 配置服务向注册中心注册的实例id
//     */
//    @Bean
//    public void instanceIdConfig(){
//        String ipAddress = eurekaInstanceConfigBean.getIpAddress();
//        eurekaInstanceConfigBean.setInstanceId(ipAddress+":"+eurekaInstanceConfigBean.getAppname()+":"+eurekaInstanceConfigBean.getNonSecurePort());
//    }
//}
